<?php
namespace kakugyou\toolkit_update_url;

class ModelToolsetUpdateUrl extends Model {
	public function batchUpdate($data = array()) {
		$tables=array('article_category_description','article_description','category_description','information_description','manufacturer_description','note_description','product_description');
		
		foreach($tables as $table){
			$sql="UPDATE " . DB_PREFIX .$this->db->escape($table)
			." set description=REPLACE(".$this->db->escape('description').",'".$this->db->escape($data['url0'])."','".$this->db->escape($data['url1'])."')";
			
			$this->db->query($sql);
		}
	} 
	
	
	
	
}
?>